<template>
  <div id="app">
    <router-view></router-view>
  </div>
</template>

<script>
  import store from './store/store'
  import Console from './components/console'

  export default {
    name: 'app',
    store,
    components: {
      'Console': Console
    },
    data: function () {
      return {
        consoleFlag: false
      }
    },
    created:function(){
      let _this = this;
      window.document.addEventListener('keydown', function (e) {
        if (e.ctrlKey && e.shiftKey && e.keyCode == 76) {
          _this.toggleConsole();
        }
      });
      //step1,判断用户身份

      //初始化配置文件，从数据库中获得

    },

    mounted:function(){
        this.$router.replace("/login")
    },

    methods: {
      toggleConsole: function () {
        this.consoleFlag = !this.consoleFlag;
      }
    }
  }
</script>

<style>

  html {
    font-family: "PingFang-Medium", "sans-serif", "STHeitiSC-Light", "\5FAE\8F6F\96C5\9ED1", "Microsoft YaHei";
  }

  html, body, #app {
    width: 100%;
    height: 100%;
    margin: 0;
    padding: 0;
    overflow: hidden;
    user-select: none;
    cursor: default;
  }

  .transparentBG {
    background: transparent;
  }

  .flex-box-v {
    display: flex;
    flex-direction: column;
  }

  .flex-box-h {
    display: flex;
    flex-direction: row;
  }

  .flex-position-center {
    align-items: center;
    justify-content: center;
  }

  .flex-box-v-top {
    align-items: stretch;
    justify-content: flex-start;
  }

  .flex-box-v-bottom {
    align-items: stretch;
    justify-content: flex-end;
  }

  .flex-box-h-left {
    align-items: flex-start;
    justify-content: flex-start;
  }

  .flex-box-h-right {
    align-items: flex-end;
    justify-content: flex-end;
  }

  .flex-item-size-fit {
    flex-grow: 1;
    flex-shrink: 0;
    flex-basis: 100%;
    flex: 1 0 100%;
  }

  .flex-item-size-auto {
    flex-grow: 1;
    flex-shrink: 1;
    flex-basis: auto;
    flex: 1 1 auto;
  }

  .flex-header {
    flex: 0 0 5rem;
  }

  .flex-content {
    flex: 1
  }

  ::-webkit-scrollbar {
    width: 8px;
    height: 8px;
    background-color: #1F2D3D;
  }

  ::-webkit-scrollbar-track {
    border-radius: 10px;
    background-color: #1F2D3D;
  }

  ::-webkit-scrollbar-thumb {
    border-radius: 10px;
    -webkit-box-shadow: inset 0 0 6px rgba(0, 0, 0, .3);
    background-color: #555;
  }

  ::-webkit-scrollbar {
    width: 0;
    height: 0;
  }
</style>
